/**
 * 
 */
package edu.cmu.lti.lm.dt;

import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

/**
 * @author qing
 *
 */
public class Question implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -8714710904391058782L;
	private Feature feature;
	private Set<String> positive = new HashSet<String>();

	public Collection<String> set(){
		return positive;
	}
	public boolean classify(History h){
		return positive.contains(feature.getValue(h));
	}
	
	public boolean classify(Entry e){
		return positive.contains(e.get(feature));
	}

	public Feature getFeature() {
		return feature;
	}

	public void setFeature(Feature feature) {
		this.feature = feature;
	}

	public boolean add(String o) {
		return positive.add(o);
	}

	public boolean addAll(Collection<? extends String> c) {
		return positive.addAll(c);
	}

	public void clear() {
		positive.clear();
	}

	public boolean contains(Object o) {
		return positive.contains(o);
	}

	public boolean containsAll(Collection<?> c) {
		return positive.containsAll(c);
	}

	public boolean equals(Object o) {
		return positive.equals(o);
	}

	public int hashCode() {
		return positive.hashCode();
	}

	public boolean isEmpty() {
		return positive.isEmpty();
	}

	public Iterator<String> iterator() {
		return positive.iterator();
	}

	public boolean remove(Object o) {
		return positive.remove(o);
	}

	public boolean removeAll(Collection<?> c) {
		return positive.removeAll(c);
	}

	public boolean retainAll(Collection<?> c) {
		return positive.retainAll(c);
	}

	public int size() {
		return positive.size();
	}

	public Object[] toArray() {
		return positive.toArray();
	}

	public <T> T[] toArray(T[] a) {
		return positive.toArray(a);
	}
}
